package com.wcy.feign.perm;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wcy.entity.RolePermission;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "cloud-provider-perm",contextId = "FeignRolePermissionService")
public interface FeignRolePermissionService {
    @GetMapping("rolePermission/page")
    public ResponseEntity<Page<RolePermission>> getPage(@RequestParam(name = "pageNum",defaultValue = "1") int pageNum,
                                                        @RequestParam(name = "pageSize",defaultValue = "10") int pageSize);
    @GetMapping("rolePermission/list")
    public ResponseEntity<List<RolePermission>> getList();
    @PostMapping("rolePermission/add")
    public ResponseEntity<Void> add(RolePermission rolePermission);
    @PutMapping("rolePermission/update")
    public ResponseEntity<Void> update(RolePermission rolePermission);
    @DeleteMapping("rolePermission/delete/{id}")
    public ResponseEntity<Void> delete(@PathVariable("id") Integer id);
}
